<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!-- import CSS -->
    <link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.15.9/theme-chalk/index.css">
    <title>Title</title>
    <style>
        a{text-decoration: none;font-size: 14px;text-align: center}
        a:link{color:#cccccc }
        a:hover{color: white}
        .center{width: 1200px;margin: 0 auto}
        .el-dropdown-link {
            cursor: pointer;
            color: #409EFF;
        }
        .el-icon-arrow-down {
            font-size: 12px;
        }
        .el-select .el-input {
            width: 110px;
        }
        .input-with-select .el-input-group__prepend {
            background-color: #fff;
        }

        .common {
            margin-right: 30px;
            float: right;
        }
        .cart-option {
            height: 40px;
            line-height: 40px;
            font-size: 14px;
            color: #999999;
            margin-top: 15px;
        }

        .num {
            font-size: 24px;
            font-weight: 700;
            vertical-align: bottom;
            margin: 0 5px;
            color: #ff6f00;
        }
        .info{
            float: left;
            margin-left: 50px;

        }
        .order_card{
            border: 1px solid dodgerblue;
            border-radius: 0;
            margin-top: 10px;
        }
        .order_title span{
            margin-right: 20px;
        }
        .order_title a:hover{
            color: dodgerblue;
            text-decoration: underline ;
        }
    </style>
</head>
<body>
<div id="app">
    <el-container>
        <el-header height="100px">
            <div class="center">
                <el-row style="height: 25px;background-color: #386582;color: white" >
                    <el-col v-show="localStorage.user==null" span="2"  style="padding: 0 10px" offset="2">
                        <a href="/login.html" style="color: #cccccc">登录</a>

                    </el-col>
                    <el-col v-show="localStorage.user!=null" span="2"  style="padding: 0 10px" offset="2">
                        <a href="/personal.html" style="color: #cccccc">欢迎回来</a>

                    </el-col>
                    <el-col v-show="localStorage.user!=null" span="2"  style="padding: 0 10px" offset="2">
                        <a href="javascript:void(0)" @click="logout()">退出登录</a>

                    </el-col>
                    <el-col span="2" v-show="localStorage.user==null" span="1" style="width: 400px">
                        <a href="/reg.html" style="color: #cccccc">注册</a>
                    </el-col>
                    <el-col span="2"  span="2" offset="1">
                        <a href="/products/list.html">我的订单</a>
                    </el-col>
                    <el-col span="2"  span="2" offset="1">
                        <a href="/help.html">帮助中心</a>
                    </el-col>
                    <el-col span="2"></el-col>
                    <el-col span="2"  span="2" offset="1">
                        <el-dropdown>
              <span class="el-dropdown-link" style="color: #cccccc">我的鹿途
              <i class="el-icon-arrow-down el-icon--right"></i>
              </span>
                            <el-dropdown-menu slot="dropdown">
                                <el-dropdown-item @click="location.href='/personal.html'">我的鹿途</el-dropdown-item>
                                <el-dropdown-item @click="location.href='/list.html'">订单中心</el-dropdown-item>
                                <el-dropdown-item @click="location.href='/blog.html'">社区</el-dropdown-item>
                                <el-dropdown-item @click="location.href='/personal/points.html'">我的等级</el-dropdown-item>
                                <el-dropdown-item @click="location.href='/personal/manager.html'">账户管理</el-dropdown-item>
                            </el-dropdown-menu>
                        </el-dropdown>
                    </el-col>

                    <el-col span="2" v-show="localStorage.user!=null" span="1"></el-col>

                    <el-col span="12" ></el-col>
                </el-row>
            </div>
            <div class="center" style="height: 60px">
                <el-row gutter="20" style="margin-top: 20px">
                    <el-col span="2" offset="2">
                        <a href="/" style="font-size: 36px;margin: 0; padding: 0;float: right">
                            <img src="imgs/logo.png" style="width: 50px;height: 50px">
                        </a>
                    </el-col>
                    <el-col span="3" style="margin: 0 auto">
                        <span style="color: #278996;font-size: 30px;text-align: center;float: left">鹿途网</span>

                    </el-col>

                    <el-col span="4">
                        <div style="font-size: 12px;margin: 0 auto">
                            <p style="margin: 0">服务热线 9:00-17:00</p>
                            <p style="margin: 0;font-weight: bold;font-size: 16px">400  679  6699</p>
                        </div>
                    </el-col>
                </el-row>
            </div>
        </el-header>
        <el-main>
            <div class="center"
                 style="width: 1200px;height: 800px;background-color: white">
                <el-row gutter="20">
                    <el-col span="3">
                        <el-menu :default-active="activeIndex"
                                 class="el-menu-vertical-demo"
                                 text-color="rgb(39,137,150)">
                            <el-menu-item index="1">
                                <a href="/cart.html" style="color: rgb(39,137,150)"><span slot="title">我的购物车</span></a>
                            </el-menu-item>
                            <el-menu-item index="2">
                                <span slot="title">我的订单</span>
                            </el-menu-item>
                        </el-menu>
                    </el-col>
                    <el-col span="21">
                        <el-menu :default-active="activeIndex2" class="el-menu-demo" mode="horizontal" @select="handleSelect">
                            <el-menu-item index="1">全部订单</el-menu-item>
                            <el-menu-item index="2">待付款</el-menu-item>
                            <el-menu-item index="3">待使用</el-menu-item>
                            <el-menu-item index="4">已退款</el-menu-item>
                        </el-menu>
                        <el-card>
                            <el-input placeholder="请输入订单信息"  class="input-with-select" v-model="keyword" @keydown.native.enter="searchOrder()">
                                <el-select v-model="selectOrder"  slot="prepend" placeholder="请选择">
                                    <el-option label="全部" value=0></el-option>
                                    <el-option v-for="t in typeArr" :label="t.name" :value="t.id"></el-option>
                                </el-select>
                                <el-button slot="append" icon="el-icon-search" @click="searchOrder()"></el-button>
                            </el-input>
                            <el-card class="order_card" v-for="c in contentArr">
                                <div class="order_title">
                                    <span>订单号：<a href="">{{c.id}}</a></span>
                                    <span>预定日期：{{c.createTime}}</span>
                                    <span style="color: dodgerblue"><a href="">删除订单</a></span>
                                </div>
                                <div class="order_body">

                                </div>

                            </el-card>
                        </el-card>
                    </el-col>
                </el-row>
            </div>
        </el-main>
        <el-footer style="margin: 0;padding: 0">
            <my-footer></my-footer>
        </el-footer>
    </el-container>
</div>
</body>
<!-- import Vue before Element -->
<script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js"></script>
<!-- import JavaScript -->
<script src="https://cdn.staticfile.org/element-ui/2.15.9/index.min.js"></script>
<!--引入Axios-->
<script src="https://cdn.bootcss.com/axios/0.18.0/axios.min.js"></script>
<!--引入自己的js文件-->
<script src="js/my-footer.js"></script>
<script>
    let v = new Vue({
        el: '#app',
        data: function () {
            return {
                activeIndex:'2',
                activeIndex2:'1',
                //选择搜索类型的下标
                selectOrder: '0',
                contentArr:[{id:'12423234',startDate:'2023/05/27',endDate:'2023/05/27',createTime:'2023-5-2',
                    imgUrl:'imgs/header.png',name:'上海一日游',type:'一日游',price:'100',quantity:'2',status:0},
                    {id:'124233213',startDate:'2023/5/21',endDate:'2023/5/28',createTime:'2023-5-2',
                        imgUrl:'imgs/logo.png',name:'沙县大酒店',type:'单人间',price:'150',quantity:'2',status:3},
                    {id:'124233213',startDate:'2023/5/21',endDate:'2023/5/28',createTime:'2023-5-2',
                        imgUrl:'imgs/logo.png',name:'沙县大酒店',type:'单人间',price:'150',quantity:'2',status:1},
                    {id:'124233214',startDate:'2023/05/21',endDate:'2023/05/28',createTime:'2023-5-2',
                        imgUrl:'imgs/logo.png',name:'沙县小酒店',type:'双人间',price:'250',quantity:'1',status:4}
                ],
                keyword:'',
                typeArr:[],
            }
        },

        methods: {
            /*//删除单个商品
            deleteCartGoods (orderInfo) {
                this.$confirm('此操作将移除购物车的商品, 是否继续?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(async () => {
                    // 这里调用接口删除的方法
                }).catch((e) => {
                    console.log(e)
                    this.$message.info('已取消删除')
                })
            },*/
            //搜索商品
            searchOrder(){
                /*axios.get("/v1/carts/"+v.select+"/search?keyword="+v.keyword).then(function (response) {
                    if(response.data.code==1){
                        v.contentArr=response.data.data;
                    }
                })*/
            },
            //选择订单状态
            handleSelect(key, keyPath) {
                if(key==2){
                    this.contentArr=[{id:'12423234',startDate:'2023/05/27',endDate:'2023/05/27',createTime:'2023/5/2 11:11:11',
                        imgUrl:'imgs/header.png',name:'上海一日游',type:'一日游',price:'100',quantity:'2',status:0}]
                }
                if(key==3){
                    this.contentArr=[{id:'124233213',startDate:'2023/5/21',endDate:'2023/5/28',createTime:'2023/5/2 11:11:12',
                        imgUrl:'imgs/logo.png',name:'沙县大酒店',type:'单人间',price:'150',quantity:'2',status:1}]
                }
                if(key==4){
                    this.contentArr=[{id:'124233213',startDate:'2023/5/21',endDate:'2023/5/28',createTime:'2023/5/2 11:11:12',
                        imgUrl:'imgs/logo.png',name:'沙县大酒店',type:'单人间',price:'150',quantity:'2',status:3}]
                }
            },

        },
        created:function (){
        }

    })
</script>
</html>